﻿using System;
using System.Collections.Generic;
using System.Text;

namespace efcoredemo.Entity
{

    public class User
    {
        private User() { }
        public User(string name, string phone, int sex)
        {
            Name = name;
            Phone = phone;
            Sex = sex;
        }

        public User(long id, string name, string phone, int sex)
        {
            Name = name;
            Phone = phone;
            Sex = sex;
            Id = id;
        }

        public User(string name, string phone, int sex, ICollection<UserDept> userDepts, ICollection<UserCompany> userCompanys)
        {
            Name = name;
            Phone = phone;
            Sex = sex;
            UserDepts = userDepts;
            UserCompanys = userCompanys;
        }

        public User(long id, string name, string phone, int sex, ICollection<UserDept> userDepts, ICollection<UserCompany> userCompanys)
        {
            Name = name;
            Phone = phone;
            Sex = sex;
            UserDepts = userDepts;
            UserCompanys = userCompanys;
            Id = id;
        }
        public long Id { get; private set; }
        public string Name { get; private set; }
        public string Phone { get; private set; }
        public int Sex { get; private set; }
        public virtual ICollection<UserDept> UserDepts { get; private set; }
        public virtual ICollection<UserCompany> UserCompanys { get; private set; }
    }
}
